package org.wendu.wdoa.service.impl;

import org.wendu.wdoa.dao.PwdDao;
import org.wendu.wdoa.model.User;
import org.wendu.wdoa.service.PasswordService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
@Transactional
public class PasswordServiceImpl implements PasswordService {

    @Resource
    private PwdDao pwdDao;



    @Override
    public int isRightPassword(User user) {
        int i = pwdDao.checkPwd(user.getU_id(), user.getU_pwd());
        return i;
    }

    @Override
    public void updateUserPwd(User user) {
        pwdDao.updatePwd(user);
    }
}
